<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 26] 26.7 java.lang.reflect.Modifier (JDK 1.1)</TITLE>
<META NAME="author" CONTENT="David Flanagan">
<META NAME="date" CONTENT="Thu Jul 31 16:29:00 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java in a Nutshell">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java in a Nutshell" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch26_06.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 26<br>The java.lang.reflect Package</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch27_01.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="JNUT2-CH-26-SECT-7">26.7 java.lang.reflect.Modifier (JDK 1.1)</A></h2>

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JNUT2-CH-26-SECT-7.1"></A></h3>
</DIV>

<P CLASS=para>
This class defines a number of constants and static methods
that are used to interpret the integer values returned by
the <tt CLASS=literal>getModifiers()</tt> methods of the <tt CLASS=literal>Field</tt>,
<tt CLASS=literal>Method</tt>, and <tt CLASS=literal>Constructor</tt> classes.  The
<tt CLASS=literal>isPublic()</tt>, <tt CLASS=literal>isAbstract()</tt>, and related methods
return <tt CLASS=literal>true</tt> if the modifiers value includes the
specified modifier, otherwise they return <tt CLASS=literal>false</tt>.

<P CLASS=para>
The constants defined by this class specify the various bit
flags used in the modifiers value.  You can use these
constants to test for modifiers if you want to perform your
own boolean algebra.

<DIV CLASS=screen>
<P>
<PRE>
public class <tt CLASS=literal>Modifier</tt> extends Object {
    // <tt CLASS=literal>Default Constructor: public Modifier()</tt>
    // <tt CLASS=literal>Constants</tt>
            public static final int <tt CLASS=literal>ABSTRACT</tt>;
            public static final int <tt CLASS=literal>FINAL</tt>;
            public static final int <tt CLASS=literal>INTERFACE</tt>;
            public static final int <tt CLASS=literal>NATIVE</tt>;
            public static final int <tt CLASS=literal>PRIVATE</tt>;
            public static final int <tt CLASS=literal>PROTECTED</tt>;
            public static final int <tt CLASS=literal>PUBLIC</tt>;
            public static final int <tt CLASS=literal>STATIC</tt>;
            public static final int <tt CLASS=literal>SYNCHRONIZED</tt>;
            public static final int <tt CLASS=literal>TRANSIENT</tt>;
            public static final int <tt CLASS=literal>VOLATILE</tt>;
    // <tt CLASS=literal>Class Methods</tt>
            public static boolean <tt CLASS=literal>isAbstract</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isFinal</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isInterface</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isNative</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isPrivate</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isProtected</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isPublic</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isStatic</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isSynchronized</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isTransient</tt>(int <tt CLASS=literal>mod</tt>);
            public static boolean <tt CLASS=literal>isVolatile</tt>(int <tt CLASS=literal>mod</tt>);
            public static String <tt CLASS=literal>toString</tt>(int <tt CLASS=literal>mod</tt>);
}
</PRE>
</DIV>

</DIV>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch26_06.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch27_01.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>java.lang.reflect.Method (JDK 1.1)</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>The java.math Package</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
